Kinetis SDK Demo Applications User Guide  1.0.0-beta
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
GPIO I2C Introduction

Introduction and the function/configuration of GPIO I2C functions. More...

GPIO I2C Introduction

Overview

This demo application is a simulator. It uses GPIO to simulate I2C protocol and thus to control mma8451 chip on board. The UART console shows values of X, Y, and Z direction, obtained from mma8451.

Supported Hardware

TWR-K64F120M (OpenSDA as debug UART) FRDM-K64F120M (OpenSDA as debug UART)

Default Debug Console

  • UART instance: OpenSDA CDC
  • Baudrate: 115200bps

UART Output

MMA8451:

For MMA8451, UART gives output values of X, Y, and Z direction, obtained from mma8451. For FXOS8700CQ, UART gives output values of X, Y, Z direction and magnetism.
== Accelerometer Test ==
Reading acceleration data...
x=4, y=1, z=1

FXOS8700CQ:

For FXOS8700CQ, UART gives output values of X, Y, Z direction and magnetism.
== Accelerometer Test ==
Jan 8 2014 15:12:40
Initializing FXOS...
Resetting FXOS...
Reading acceleration data...
xAcc = -120, yAcc = -120, zAcc = 4095, xMag = -1, yMag = -1, zMag = -1